package com.my.db.test.mybatis;//package com.my.thread.h2;


import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.my.db.test.mybatis.annotation.Unique;
import com.my.db.test.mybatis.base.BaseEntity;
import com.my.db.test.mybatis.enums.DemoLevelEmum;
import com.my.db.test.mybatis.enums.EnumConstants;
import com.my.db.test.mybatis.enums.config.JacksonEnumDeserializer;
import com.my.db.test.mybatis.enums.defal.CustomEnums;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author timo 2021/3/4
 */
@Data
@TableName("employee")
//指定Data生成的 set 返回当前对象
@Accessors(chain = true)
public class Employee extends BaseEntity {
    @Unique
    private String name;
    /**测试枚举  @JsonDeserialize 指定RequestBody时的转换器*/
    @JsonDeserialize(using = JacksonEnumDeserializer.class)
    private DemoLevelEmum level;
    @JsonDeserialize(using = JacksonEnumDeserializer.class)
    private EnumConstants.StatusEnum statu;
    @JsonDeserialize(using = JacksonEnumDeserializer.class)
    private CustomEnums.SexEnum sex;

    /**
     * 是否删除
     */
//    @TableField(value = "is_deleted",fill = FieldFill.INSERT)
//    @TableLogic //逻辑删除
//    private Integer isDeleted;

}
